﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebNhaCungCap.app.DAO
{
    public class LOAITAILIEU
    {
        public static void InsertLOAITAILIEU(String tenLoaiTaiLieu)
        {
            String sql = "INSERT INTO LOAITAILIEU(TenLoaiTaiLieu) values(N'" + tenLoaiTaiLieu + "')";
            Dataprovider dp = new Dataprovider();
            dp.ExecuteNonQuery(sql);
        }

        public static void UpdateLOAITAILIEU(DTO.LOAITAILIEU ltl)
        {
            String sql = "UPDATE LOAITAILIEU SET TenLoaiTaiLieu=N'" + ltl.TenLoaiTaiLieu + "' where MaLoaiTaiLieu=" + ltl.MaLoaiTaiLieu;
            Dataprovider dp = new Dataprovider();
            dp.ExecuteNonQuery(sql);

        }

        public static void DeleteLOAITAILIEU(int maLoaiTaiLieu)
        {
            Dataprovider dp = new Dataprovider();
            dp.DELETE_LOAITAILIEU("DELETE_LOAITAILIEU", maLoaiTaiLieu);
        }

    }
}